package net.chenlin.dp.modules.tcpDemo;

import java.text.SimpleDateFormat;
import java.util.Date;

/**
 * @author Yangsm
 * @ClassName: MethodTest
 * @Description: TODO
 * @date 2022年11月17日 22:02
 */
public class MethodTest {

    public static void main(String[] args) {
        String ch = "{540029494,14,202211252218,0.00,0.00,0.00,0.00,0.00,0.00}";

        //System.out.println(ch.contains("REG"));
        String substring = ch.substring(1, ch.length()-1);
        //System.out.println(substring);
        String[] split = substring.split(",");
        //System.out.println(split[split.length -1]);
        System.out.println(split.length);
        for(int i = 0;i< split.length;i++){
            //System.out.println(i);
            System.out.println(split[i]);
        }
//        if(split[split.length -1].equals("REG")){
//
//            SimpleDateFormat sf = new SimpleDateFormat("yyyyMMddHHmmss");
//            String dateString = sf.format(new Date());
//            System.out.println(dateString);
//            String s = "{"+split[0]+","+dateString+",SUC}";
//            System.out.println(s);
//        }

    }
}
